home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / MPW / gzip 1.2.2 / cextras-1.0 / bsd-strings.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-08  |  1.1 KB  |  47 lines  |  [TEXT/MPS ]

  1. /*
  2.     bsd-strings.c -- BSD Unix string functions.
  3.  
  4.     Copyright (c) 1993 Anthony C. Ard.
  5.  
  6.     This program is free software; you can redistribute it and/or
  7.     modifiy it under the terms of the GNU General Public License
  8.     as published by the Free Software Foundation; either version 2
  9.     of the License, or (at your option) any later version.
  10.     
  11.     This program is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14.     GNU General Public License for more details.
  15.     
  16.     You should have received a copy of the GNU General Public License
  17.     along with this program; if not, write to the Free Software
  18.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. */
  20.  
  21. #include <String.h>
  22.  
  23. char *index( const char *s1, int c )
  24. {
  25.     return strchr( s1, c );
  26. }
  27.  
  28. char *rindex( const char *s1, int c )
  29. {
  30.     return strrchr( s1, c );
  31. }
  32.  
  33. void *bcopy( const void *a1, void *a2, size_t size )
  34. {
  35.     return memcpy( a2, a1, size );
  36. }
  37.  
  38. void *bzero( void *a1, size_t size )
  39. {
  40.     return memset( a1, 0, size );
  41. }
  42.  
  43. int bcmp( const void *a1, const void *a2, size_t n )
  44. {
  45.     return memcmp( a1, a2, n );
  46. }
  47.